# 参考 man 5 keymaps

Char_Key = [chr(i) for i in range(ord('a'), ord('z')+1)]

# 无法在XML中表达的字符
Unxml_Key = {  # depressed: 其实可以使用 &amq; 转义实现，参考readme中[xml] 特例说明
    "angle_brackets": "<",
    "SPC_0"         : "<",
    "backslash"     : "\"",
    "SPC_1"         : "\"",
    "ampersand"     : "&",
    "SPC_2"         : "&",
    # "pound"         : "#",
    # "asterisk"      : "*",
    # "curly braces"  : "{",
}

Modifier_Key = {
    "Shift"       : 1,
    "Caps"        : 2,
    "Ctrl"        : 4,
    "Alt"         : 8,
    "NMLK"        : 16,   # "NumLock"
    "MOD3"        : 32,
    "Super"       : 64,   # "WIN"
    "AltGr"       : 128,  # "RALT"
    "UDF"         : 256,
    "UDF2"        : 512,
    "UDF3"        : 1024
}
# SHIFT, CAPS, CTRL, ALT, NUMLK, MOD3, SUPER, ALTGR = (1 << bit for bit in range(8))

Code_Key = {  # virtkey.press_keycode() 调用
    "backspace"   : 22,
    "enter"       : 36,
}

Function_Key = {
    # "space"      : 0x0020,

    "kp_space"   : 65408,
    "insert"     : 0xff63,
    "home"       : 0xff50,
    "page_up"    : 0xff55,
    "page_down"  : 0xff56,
    "end"        : 0xff57,
    "delete"     : 0xffff,
    "return"     : 65293,
    "backspace"  : 65288,
    "left"       : 0xff51,
    "up"         : 0xff52,
    "right"      : 0xff53,
    "down"       : 0xff54,

    "esc"        : 65307,
    "prnt"       : 65377,
    "scroll"     : 65300,
    "pause"      : 65299,

    "F1"        : 65470,
    "F2"        : 65471,
    "F3"        : 65472,
    "F4"        : 65473,
    "F5"        : 65474,
    "F6"        : 65475,
    "F7"        : 65476,
    "F8"        : 65477,
    "F9"        : 65478,
    "F10"       : 65479,
    "F11"       : 65480,
    "F12"       : 65481,
}
